const { Controller } = require('egg');

class NewsController extends Controller {

  async getNewsByUser() {
    const { ctx } = this;
    const query = ctx.request.query;

    const newsService = ctx.service.news;
    const res = newsService.getNewsByUser(query);
    ctx.body = ctx.helper.responseSucceed({ data: res });
  }
}

module.exports = NewsController;
